<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	  xmlns:local="clr-namespace:DentalGUIHelper;assembly=DentalConfig"
    xmlns:dgh="clr-namespace:DentalGUIHelper;assembly=DentalConfig">

    <ResourceDictionary.MergedDictionaries>
      <ResourceDictionary Source="../Brushes/MaterialDesign/MaterialDesignTheme.Theme.xaml"/>
    </ResourceDictionary.MergedDictionaries>
  <!--

Add subsequent lines to a text block style where the text representation does not look good at your sreen.

-->

  <!-- Possible values: Ideal, Display -->
  <!-- <Setter Property="TextOptions.TextFormattingMode" Value="Ideal" /> -->
  <!-- Possible values: Aliased, Auto, ClearType Grayscale -->
  <!-- <Setter Property="TextOptions.TextRenderingMode" Value="{DynamicResource TextBlockTextRenderingMode}" /> -->

  <!-- To derive from it-->
  <Style x:Key="TextBlockBase" TargetType="{x:Type TextBlock}">
    <Style.Triggers>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="Opacity" Value="{DynamicResource DisabledOpacity}" />
      </Trigger>
    </Style.Triggers>
  </Style>

  <!-- All caps -->
  <Style x:Key="UpperTextBlock" BasedOn="{StaticResource TextBlockBase}" TargetType="{x:Type TextBlock}">
    <Setter Property="dgh:TextBlockService.CharacterCasing" Value="Upper"/>
  </Style>

  <!-- Header -->
  <Style x:Key="HeaderTextBlock" BasedOn="{StaticResource TextBlockBase}" TargetType="{x:Type TextBlock}">
    <Setter Property="FontSize" Value="{DynamicResource HeaderFontSize}"/>
    <Setter Property="FontFamily" Value="{DynamicResource HeaderFontFamily}"/>
    <Setter Property="Foreground" Value="{DynamicResource BlackBrush}"/>
  </Style>

  <!-- Small Header -->
  <Style x:Key="SmallHeaderTextBlock" BasedOn="{StaticResource TextBlockBase}" TargetType="{x:Type TextBlock}">
    <Setter Property="FontSize" Value="26"/>
    <Setter Property="FontFamily" Value="{DynamicResource HeaderFontFamily}"/>
    <Setter Property="Foreground" Value="{DynamicResource BlackBrush}"/>
  </Style>

  <!-- Sub Header -->
  <Style x:Key="SubHeaderTextBlock" BasedOn="{StaticResource TextBlockBase}" TargetType="{x:Type TextBlock}">
    <Setter Property="FontSize" Value="{DynamicResource SubHeaderFontSize}"/>
    <Setter Property="FontFamily" Value="{DynamicResource HeaderFontFamily}"/>
    <Setter Property="Foreground" Value="{DynamicResource BlackBrush}"/>
  </Style>

  <!-- Small Sub Header -->
  <Style x:Key="SmallSubHeaderTextBlock" BasedOn="{StaticResource TextBlockBase}" TargetType="{x:Type TextBlock}">
    <Setter Property="FontSize" Value="{DynamicResource SmallSubHeaderFontSize}"/>
    <Setter Property="FontFamily" Value="{DynamicResource SmallSubHeaderFontFamily}"/>
  </Style>

  <!-- Small Sub Header -->
  <Style x:Key="MidSubHeaderTextBlock" BasedOn="{StaticResource TextBlockBase}" TargetType="{x:Type TextBlock}">
    <Setter Property="FontSize" Value="{DynamicResource MidSubHeaderFontSize}"/>
    <Setter Property="FontFamily" Value="{DynamicResource MidSubHeaderFontFamily}"/>
  </Style>

  <Style x:Key="GridCellTextBlock" BasedOn="{StaticResource TextBlockBase}" TargetType="{x:Type TextBlock}">
    <Setter Property="FontSize" Value="14"/>
    <Setter Property="FontFamily" Value="{DynamicResource DefaultFont}"/>
  </Style>

  <Style x:Key="DefaultTextBlock" BasedOn="{StaticResource TextBlockBase}" TargetType="{x:Type TextBlock}">
    <Setter Property="FontSize" Value="{DynamicResource SmallSubHeaderFontSize}"/>
    <Setter Property="FontFamily" Value="{DynamicResource SmallSubHeaderFontFamily}"/>
    <Setter Property="Foreground" Value="{DynamicResource BlackBrush}"/>
  </Style>

  <Style x:Key="InfoTextBlockStyle" BasedOn="{StaticResource TextBlockBase}" TargetType="{x:Type TextBlock}">
    <Setter Property="FontSize" Value="11"/>
    <Setter Property="FontFamily" Value="{DynamicResource BoldFontFamily}"/>
    <Setter Property="Foreground" Value="{DynamicResource BlackBrush}"/>
  </Style>

  <!-- GroupSelector text style -->
  <Style x:Key="GroupSelectorTextBlockStyle" TargetType="{x:Type TextBlock}">
    <Setter Property="FontSize" Value="{DynamicResource NormalFontSize}"/>
    <Setter Property="FontFamily" Value="{DynamicResource DefaultFont}"/>
    <Setter Property="TextTrimming" Value="CharacterEllipsis"/>
    <Style.Triggers>
      <Trigger Property="local:TextBlockService.IsTextTrimmed" Value="True">
        <Setter Property="ToolTip" Value="{Binding Text,RelativeSource={RelativeSource Self}}"/>
      </Trigger>
      <Trigger Property="IsMouseOver" Value="True">
        <Setter Property="local:TextBlockService.CalculateIsTextTrimmed" Value="true"/>
      </Trigger>
    </Style.Triggers>
  </Style>

  <Style x:Key="ControlContentTextblock" TargetType="{x:Type TextBlock}"/>

  <Style x:Key="{x:Type TextBlock}" BasedOn="{StaticResource TextBlockBase}" TargetType="{x:Type TextBlock}" />
</ResourceDictionary>
